//
// Created by macos on 2021/12/12.
//

#include <http.h>
#include <logger.h>


int main() {
    log_init();
    log_set_level(LOG_DEBUG);
    const char *url = "http://59.56.77.23:8000/api/v1/idc/get";
    mlist_t params;
    params = list_init(0);
    kv_put(params, "idcId", "1003");
    struct http_response response;
    uint16_t http_status;
    http_status = ghttp_post(url, NULL, params, &response);
    logDebug("返回码%d,长度%u,结果:%s", http_status, response.size, response.response);
    kv_destory(params);
    return 0;
}